/*
 * @Author: nqx2007 fenglimima334@163.com
 * @Date: 2023-12-04 18:05:57
 * @LastEditors: nqx2007 fenglimima334@163.com
 * @LastEditTime: 2023-12-11 18:13:01
 * @FilePath: /operator-manager/config/proxy.ts
 * @Description:代理配置,主要是为了各个环境联调或者定位问题
 */
import type { ProxyOptions } from '@umijs/bundler-utils';

const proxy: Record<string, Record<string, ProxyOptions>> = {
  dev: {
    //开发环境
    '/api/': {
      target: 'http://47.97.162.105:8080',
      changeOrigin: true,
      pathRewrite: { '^/api': '' },
    },
  },
  test: {
    //测试环境
    '/api/': {
      target: 'your test url',
      changeOrigin: true,
      pathRewrite: { '^': '' },
    },
  },
  pre: {
    //预发环境
    '/api/': {
      target: 'your pre url',
      changeOrigin: true,
      pathRewrite: { '^': '' },
    },
  },
};

export default proxy;
